// -----------------------------------------------------------------------
// <copyright file="IFileSystemProvider.cs" company="Microsoft">
// interface which helps mocking
// </copyright>
// -----------------------------------------------------------------------
namespace WebServer.BusinessLogic.Handlers.Interface
{
    using System.Collections.Generic;
    using System.IO;

    /// <summary>
    /// Interface IFileSystemProvider which helps mocking
    /// </summary>
    public interface IFileSystemProvider
    {
        /// <summary>
        /// Check existing directory info
        /// </summary>
        /// <param name="path">path to the directory</param>
        /// <returns>bool existing</returns>
        bool DirectoryExists(string path);

        /// <summary>
        /// Creating directory info
        /// </summary>
        /// <param name="path">path to the directory</param>
        /// <returns>DirectoryInfo object</returns>
        DirectoryInfo CreateDirectoryInfo(string path);

        /// <summary>
        /// Getting file system infos
        /// </summary>
        /// <param name="path">path to the file or directory</param>
        /// <returns>file system info</returns>
        IList<FileSystemInfoModel> GetFileSystemInfos(string path);

        /// <summary>
        /// Check file exists
        /// </summary>
        /// <param name="path">path to the file</param>
        /// <returns>bool file exist</returns>
        bool FileExists(string path);

        /// <summary>
        /// Getting data or file
        /// </summary>
        /// <param name="cacheKey">key of cache</param>
        /// <param name="filePath">path to the file</param>
        /// <returns>data array</returns>
        byte[] GetDataOrFile(string cacheKey, string filePath);

        /// <summary>
        /// Reads data from file
        /// </summary>
        /// <param name="pathToFile">Path to file</param>
        /// <returns>Bytes of read file</returns>
        byte[] ReadBytesFromFile(string pathToFile);
    }
}